<?php include( "templates/include/header.php" );
  include( "templates/include/adminHeader.php" );?>
  
  <h2>Administation d'images</h2>
  <p>Vous &ecirc;tes connect&eacute; en tant que <b><?php echo htmlspecialchars( $_SESSION['username']) ?></b>. <a href="admin.php?action=logout"?>Se D&eacute;connecter</a></p>
  
  <table>
    <tr>
      <td valign="top" style="margin:0;padding:0" align="left">
        <label for="picture">Images :</label>
        </br>
        <?php
          foreach( $images as $image ) {
            $tmp = explode( '/', $image['image']);
            echo( '<a href="admin.php?action=editImage&amp;id=' . $results['edit']->id . '&amp;imageId=' . $image['id'] .'&amp;origin=home">' . end($tmp) . '</a> </br>' );
          } ?>
          <p><a href="<?php echo("admin.php?action=upload" . ucfirst($type) . "Image&amp;homeId=" . $results['edit']->id ?>">Ajouter une photo</a></p>
      </td>
    </tr>
  </table>
  
  <?php 
  include( "templates/include/adminFooter.php" );
  include( "templates/include/footer.php" ); ?>
